Types & Exceptions

Exceptions

class Exception : public std::runtime_error

Exception with error type and descriptive message.

Wraps a phoim_Result error code for programmatic error handling. The error message is accessible via e.what().

See also

phoim_Result

Subclassed by phoim::InstantMeshing::InvalidLicenseException

Public Functions

inline Exception(phoim_Result error_type, const std::string &message)

Construct an exception with error type and message.

Parameters:
  • error_type – The error code from phoim_Result.

  • message – A descriptive error message.

inline phoim_Result GetErrorType() const

Get the error type code.

Returns:

The phoim_Result error code.

class InvalidLicenseException : public phoim::Exception

Exception type that is thrown when there is no valid license for API found.

Type Aliases

using phoim::DeviceId = std::string

Unique identification of a Device.

const glm::mat4 phoim::INVALID_MATRIX = glm::mat4(FLT_MAX)

Invalid matrix.

Enumerations

enum class phoim::MessageType : int32_t

Type of message returned via the message callback.

Values:

enumerator debug
enumerator info
enumerator warning
enumerator error
enumerator critical
enumerator _unspecified

Callbacks

using phoim::MessageCallback = std::function<void(const MessageType, const std::string&)>

Message callback type.

using phoim::ProgressCallback = std::function<void(const float)>

Progress callback type for reporting progress of long-running operations. Progress value is in range [0.0, 1.0] where 0.0 means just started and 1.0 means completed.